package com.yzmoney.common.model;


import com.yzmoney.common.constant.Constants;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.io.Serializable;

/**
 * Created by LiuJun on 2015/7/20.
 */
public class JsonResult<T> implements Serializable {
    //代码标志
    private int code = Constants.CODE_SUCCESS;

    public JsonResult() {
        super();
    }

    public JsonResult(int code) {
        super();
        this.code = code;
    }

    private T data;
    //提示信息
    private String msg;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
